
#include <Liberty3D/Library/AssetImporter.h>
#include <Liberty3D/Library/AssetCachedData.h>
#include <Liberty3D/Library/AssetBuildData.h>

#include <Liberty3D/Library/IMutex.h>

#include <Liberty3D/Engine/ISerializer.h>
#include <Liberty3D/Engine/AssetFileFolder.h>
#include <Liberty3D/Engine/Path.h>

using namespace Liberty::Engine;
using namespace Liberty::Library;

AssetImporter::AssetImporter() {
}

AssetImporter::~AssetImporter() {
}

std::string AssetImporter::name() const {
    std::string p2;

    Path::split(assetPath(), &p2);
    return p2;
}

void AssetImporter::setName(const std::string& name) {
}

std::string AssetImporter::userData() const {
    SharedLock lock(this);

    return _userData;
}

void AssetImporter::setUserData(const std::string& userData) {
    updateValue(_userData, userData);
}

std::string AssetImporter::generateBuildTag(const std::shared_ptr<AssetCachedData>& cachedData) {
    return std::string();
}

std::shared_ptr<AssetBuildData> AssetImporter::generateBuildData(const std::shared_ptr<AssetCachedData>& cachedData, const std::string& buildTag, const std::shared_ptr<IAssetContext>& contextForBuildData) {
    return std::shared_ptr<AssetBuildData>();
}

void AssetImporter::serializeObject(ISerializer* s) {
    if (s->isReading() || (_userData.length() > 0)) {
        s->serialize("userData", _userData);
    }
}

const char* AssetImporter::serializeClassName() const {
    return "Liberty::Library::AssetImporter";
}

void AssetImporter::serializeEnd(ISerializer*) {
}

AssetCachedData::AssetCachedData() {
}

bool AssetCachedData::isNull() const {
    return true;
}

void AssetCachedData::update(std::streambuf*) {
}

void AssetCachedData::serializeEnd(Liberty::Engine::ISerializer*) {
}

AssetBuildData::AssetBuildData() {
}

void AssetBuildData::serializeEnd(Liberty::Engine::ISerializer*) {
}

bool AssetBuildData::isNull() const {
    return true;
}
